package com.yourcompany.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("permission")
@Schema(description = "权限实体")
public class Permission extends BaseEntity {

    @Schema(description = "父级权限ID，0表示顶级权限")
    private Long parentId;

    @Schema(description = "权限名称")
    private String name;

    @Schema(description = "权限标识")
    private String code;

    @Schema(description = "权限类型：0-目录 1-菜单 2-按钮")
    private Integer type;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "路由路径")
    private String path;

    @Schema(description = "组件路径")
    private String component;

    @Schema(description = "权限表达式")
    private String permission;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "状态：0-禁用 1-启用")
    private Boolean status;

    @Schema(description = "是否外链：0-否 1-是")
    private Boolean isExternal;

    @Schema(description = "是否缓存：0-否 1-是")
    private Boolean isCache;

    @Schema(description = "是否显示：0-否 1-是")
    private Boolean isVisible;

    @Schema(description = "创建人ID")
    private Long creatorId;

    @Schema(description = "修改人ID")
    private Long modifierId;
} 